/**
 *
 * @description 企业信息查询页面
 * @author songhlc
 * @date 2016-01-18
 *
 */

define([ "jquery", "knockout", "baseview", "text!static/js/widgets/fixtool/fixtool.html",
  "common" ], function($,ko, BaseView, template, Common) {
  var self
  var view = BaseView.extend({
    setTemplate : function() {
      this.el.html(template);
      self = this
    },
    viewmodel : {
      el: '#fixtool',
      rate: ko.observable(100)
    },
    bindEvents : function() {
    },
    events: {
      handlePlus: function () {
        if (self.viewmodel.rate()<160) {
          var rate = self.viewmodel.rate()+10
          self.viewmodel.rate(rate)
          $("#wrapper-content").css('zoom', rate + '%')
        }
      },
      handleMinus: function () {
        if (self.viewmodel.rate()>40) {
          var rate = self.viewmodel.rate() - 10
          self.viewmodel.rate(rate)
          $("#wrapper-content").css('zoom', rate + '%')
        }
      }
    }
  });
  return view;
})